<?php

namespace app\api\server\circle;

use app\api\ServerBase;
use app\api\model\circle\CircleTypeApiModel;
use app\api\validate\circle\CircleTypeVal;
use think\Request;

class CircleTypeServer extends ServerBase
{

    function __construct( Request $request)
    {
        $this->request=$request;
        $this->param=$request->param();
        $this->model=new CircleTypeApiModel();
    }

    function getList(){
        $list = $this->model->where('status',1)
            ->order('sort desc,id desc')
            ->field('id,title')
            ->select();
        $result['data']=$list;
        $result['count']=$this->model->count();
        $this->getMessageCode('adminMessage.success.select',2);
        return $result;
    }
}